package com.tyqx.hashchaindao.mapper;
import com.tyqx.hashchainbean.module.SysPermission;
import com.tyqx.hashchainbean.vo.PerOrResourceResultVO;
import com.tyqx.hashchainbean.vo.SysPermissionVO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface SysPermissionMapper {

	public SysPermission getById(@Param(value = "perId") Long perId)throws Exception;

	public List<PerOrResourceResultVO>	getListByMap(Map<String, Object> param)throws Exception;

	public Integer getCountByMap(Map<String, Object> param)throws Exception;

	public Integer save(SysPermission sysPermission)throws Exception;

	public Integer modify(SysPermission sysPermission)throws Exception;

	public Integer removeById(@Param(value = "perId") Long perId)throws Exception;


	public List<SysPermissionVO> getListByMaps(Map<String, Object> param)throws Exception;

	public List<SysPermissionVO> getSysPermissionList(@Param(value = "perId") Integer perId);
	public int pRemove(@Param(value = "perId") Integer perId);
	public int pAdd(@Param(value = "perParentId") Integer perParentId, @Param(value = "perName") String perName,
             @Param(value = "createBy") String createBy, @Param(value = "day") Date day);

	public int pModify(@Param(value = "perId") Integer perId, @Param(value = "perName") String perName,
                @Param(value = "modifyBy") String modifyBy, @Param(value = "day") Date day);

	public List<Long> getPerIdByParentId(@Param("parentId") Long parentId);

	public Integer getAllPerCou();
	public List<SysPermissionVO> getAllPer(@Param("page") Integer page, @Param("limit") Integer limit);
}
